dim doc
set doc = application.activedocument
Set fso = CreateObject("Scripting.FileSystemObject")
dim ws : set ws = CreateObject("WScript.Shell")
dim obj : obj = "V_NetName"
dim regPath : regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & obj
dim oval : oval = ws.RegRead(regPath)

dim fileContent
obj = right(obj,len(obj)-2)
if oval = "0" then
	oval ="1"		
else
	oval ="0"
end if
ws.RegWrite regPath, oval, "REG_SZ"
obj = "Net Name"
obj = chr(34) & obj & chr(34)
oval = chr(34) & oval & chr(34)
fileContent = "Application.ExecuteCommand(""Display Colors Setup"")" & chr(13) & chr(10)	
fileContent = fileContent & "DisplayColorsSetupDlg.ColorGrid.Cell(""Visible Only"", " & obj &") = " & oval & chr(13) & chr(10)
fileContent = fileContent & "DisplayColorsSetupDlg.Ok.Click()"

'msgbox fileContent 	
dim tmpfile
tmpfile = doc.path & "\tmp1.mcr"			
'msgbox tmpfile & chr(13) & chr(10) & fileContent
Set file = fso.CreateTextFile(tmpfile, True)
file.Write fileContent
file.Close
'// 4. run tmp file
Application.RunMacro(tmpfile)

Set fso = nothing
set ws = nothing